/*
 * @Author: 六弦(melodyWxy)
 * @Date: 2022-03-01 11:14:14
 * @LastEditors: 六弦(melodyWxy)
 * @LastEditTime: 2022-03-01 14:16:57
 * @FilePath: /menorepo-demo/Users/wxy/codeWorks/up/d_form/antd-demo-ts/src/demo2/config.ts
 * @Description: update here
 */
import { FormSets, FormItemSets, ChildTypeSets }  from './../components/XForm/type';
import style from './index.module.css';

export const form1config =  {
    type: FormSets.Form,
    props: {
        className: style['form-wrap'],
        name: 'basic',
        initialValues: {
            remember: true
        }
    },
    onFinish: (value: any)=>{console.log(value)},
    btns: [{
        submit: true,
        text: '提交'
    }],
    children: [{
        type: FormItemSets.Item,
        props: {
            label: '用户名',
        },
        name: 'username',
        required: true,
        child: {
            type: ChildTypeSets.Input,
            props: {}
        }
    },{
        type: FormItemSets.Item,
        props: {
            label: '密码',
        },
        name: 'password',
        required: true,
        child: {
            type: ChildTypeSets.Password,
            props: {}
        }
    },{
        type: FormItemSets.Item,
        props: {
            label: '体重',
        },
        name: 'weight',
        required: true,
        child: {
            type: ChildTypeSets.InputNumber,
            props: {
                addonAfter: 'KG'
            }
        }
    },{
        type: FormItemSets.Item,
        props: {
            label: '性别',
        },
        name: 'sex',
        required: true,
        child: {
            type: ChildTypeSets.Select,
            props: {
                options: [{
                    label: '男',
                    value: 'boy'
                },{
                    label: '女',
                    value: 'girl'
                }]
            }
        }
    }, {
        type: FormItemSets.Item,
        props: {
            label: '确认密码',
        },
        name: 'enterpassword',
        required: true,
        child: {
            type: ChildTypeSets.Password,
            props: {}
        }
    }, {
        type: FormItemSets.Item,
        props: {
            wrapperCol: {
                offset: 8,
                span: 16,
            }
        },
        name: 'remember',
        child: {
            type: ChildTypeSets.Checkbox,
            props: {
                children: '记住我'
            }
        }
    }]
}